% Iris script
%% Go over the notyet folder
ny_folder = dir('notyet');
ny_folder = ny_folder(3:end);

%% Run the autozoom function
for i = 1:length(ny_folder)
    filepath = fullfile('notyet',ny_folder(i).name);
    guesspath = fullfile('guesses',[ny_folder(i).name '.guess']);
    I = imread(filepath);
    [center,radius] = circularhough(I,.5,false);
    [px, py] = circlepoints(radius);
    figure(i); imshow(I); hold on; plot(py+center(2),px+center(1));
    
    data = [center radius];
    dlmwrite(guesspath, data, 'delimiter', '\t')
end